package hy.mvpbeam.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.bumptech.glide.Glide;
import com.jude.beam.bijection.RequiresPresenter;
import com.jude.beam.expansion.data.BeamDataActivity;

import hy.mvpbeam.R;
import hy.mvpbeam.model.bean.PictureBean;
import hy.mvpbeam.persenter.activitypersenter.PictureActivityPresenter;
import hy.mvpbeam.utils.ApiService;

/**
 * Created by hy on 2016/10/26.
 */

@RequiresPresenter(PictureActivityPresenter.class)
public class PictureActivty extends BeamDataActivity<PictureActivityPresenter, PictureBean> {

    private android.support.v7.widget.RecyclerView rvnewlist;
    private android.support.v4.widget.SwipeRefreshLayout sprefresh;
    private android.widget.ImageView imageiew;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_pic);
        this.imageiew = (ImageView) findViewById(R.id.imageiew);

    }

    @Override
    public void setData(@Nullable PictureBean data) {
        super.setData(data);
        Glide.with(imageiew.getContext()).load(ApiService.PICTURE_ROOT_LOADURL+data.getTngou().get(0).getImg()).into(imageiew);
    }
}
